mixin foreign({img, x, y, width, height, opacity})
  -var image = images[img] || {}
  -var {url, width: w, height: h} = image
  -var x = x || 0
  -var y = y || 0
  -var opacity = opacity ===  0 ? 0 : (opacity || 1)

  g
    // 增加动画用block
    block
    foreignObject(x=`${x}`, y=`${y}`, width=`${width || w}`, height=`${height || h}px`)
      svg(style=`display:inline-block;width:100%;vertical-align:top;background-position:0 0;background-repeat:no-repeat;background-size:100%;
      background-attachment:scroll; background-image:url("${url}");-webkit-tap-highlight-color:transparent;user-select:none;`, opacity=opacity
      viewBox=`0 0 ${w} ${h}`)
